package com.cmc.cloud.cmclink.doc.vo.sovo.sovo;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.math.BigDecimal;

/**
 * @author 陈正
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class SoBsaCustomerCountVO {
    @Schema(description = "港口代码", requiredMode = Schema.RequiredMode.REQUIRED)
    private String polCode;
    @Schema(description = "获取分类舱位计划里配置的订舱")
    private String bookingParty;
    @Schema(description = "预留舱位 TEU")
    private int allocationSpace;
    @Schema(description = "已接TEU")
    private BigDecimal receivedTeu;
    @Schema(description = "待接TEU")
    private BigDecimal waitTeu;
    @Schema(description = "已接 自动分配的TEU")
    private BigDecimal receivedAllocationTeu;
    @Schema(description = "待接 自动分配的TEU")
    private BigDecimal waitAllocationTeu;

    public BigDecimal getReceivedTeu() {
        if(receivedTeu == null) {
            return BigDecimal.ZERO;
        }
        return receivedTeu;
    }

    public BigDecimal getWaitTeu() {
        if(waitTeu == null) {
            return BigDecimal.ZERO;
        }
        return waitTeu;
    }

    public BigDecimal getReceivedAllocationTeu() {
        if(receivedAllocationTeu == null) {
            return BigDecimal.ZERO;
        }
        return receivedAllocationTeu;
    }

    public BigDecimal getWaitAllocationTeu() {
        if(waitAllocationTeu == null) {
            return BigDecimal.ZERO;
        }
        return waitAllocationTeu;
    }
}
